package com.sinoglobal.ningxia.thread;

import com.sinoglobal.ningxia.R;
import com.sinoglobal.ningxia.beans.CommentListVo;
import com.sinoglobal.ningxia.downdata.imp.RemoteImpl;

/**
 * @author qiwx
 * @createdate 2014-7-12 上午10:40:13
 * @Description: 获取评论列表
 */
public abstract class CommentListTask extends ItktAsyncTaskWithDialog<String, Void, CommentListVo> {

	/**
	 * @author qiwx
	 * @createdate 2014-7-12 上午10:43:25
	 * @Description:
	 * @type
	 * @throws Exception
	 * @parameters
	 */
	@Override
	public CommentListVo before(String... params) throws Exception {
		CommentListVo vo;
		try {
			vo = RemoteImpl.getInstance().getCommentList(params[0], Byte.parseByte(params[1]), Byte.parseByte(params[2]),
					Byte.parseByte(params[3]));
		} catch (Exception e) {
			e.printStackTrace();
			vo = null;
		}

		return vo;
	}

	/**
	 * @author qiwx
	 * @createdate 2014-7-12 上午10:43:25
	 * @Description:
	 * @type
	 * @throws Exception
	 * @parameters
	 */
	@Override
	public void after(CommentListVo result) {
		if (result != null)
			setData();

	}
	
	public abstract void setData();

	/**
	 * @author qiwx
	 * @createdate 2014-7-12 上午10:43:25
	 * @Description:
	 * @type
	 * @throws Exception
	 * @parameters
	 */
	@Override
	public void exception() {

	}

}
